<!--
 * @Author: fengYM feng25321@163.com
 * @Date: 2023-09-21 16:09:19
 * @LastEditors: fengYM feng25321@163.com
 * @LastEditTime: 2023-10-16 16:41:37
 * @Description: App页面
-->
<script>
import { login } from "./api/home.ts";
export default {
  onLaunch: async (e) => {
    console.log("onLaunch");
    await login({
      Acctid: "6541b8b552fbe4",
      userName: "18720544598",
      password: "666666",
      lcid: 2052,
    });
  },
  onShow: function (query) {
    if (!uni.getStorageSync("userInfo")) {
      uni.reLaunch({ url: "/pages/login/login" });
    }
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style lang="scss">
html {
  box-sizing: border-box;
}
@import "@/uni_modules/uview-plus/index.scss";
/*每个页面公共css */
page {
  background: #f6f6f6;
}
.main {
  width: 94%;
  margin: 0 auto;
  padding-bottom: 30rpx;
  box-sizing: border-box;
}
.header {
  padding-top: 104rpx;
  width: 100%;
  height: 578rpx;
  background: linear-gradient(180deg, #62ca81 0%, #27ca9e 82%, rgba(40, 201, 160, 0) 100%);
  .title {
    font-size: 40rpx;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #ffffff;
    line-height: 56rpx;
    margin-bottom: 40rpx;
  }
}
.bottomBox {
  box-sizing: border-box;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8rpx 28rpx;
  padding-bottom: 30rpx;
  z-index: 10;
  .price {
    font-size: 26rpx;
    color: #595959;
    .unit {
      font-size: 24rpx;
      color: #f35555;
    }

    .num {
      font-size: 48rpx;
      color: #f35555;
      font-weight: bold;
    }
  }
  .btn {
    padding: 18rpx 66rpx;
    text-align: center;
    background: linear-gradient(90deg, #69e07d 0%, #2ed19a 33%, #1bbd7e 100%);
    border-radius: 40rpx;
    color: #fff;
    margin-left: 20rpx;
  }
}
.u-navbar__content__left__text {
  font-weight: 600 !important;
  font-size: 40rpx !important;
}
</style>
